<!-- 导航栏 -->
<header>
  <nav class="navbar">
    <div class="navbar-container">
      <div class="logo">
        <img src="./images/logo.png" class="logo_white" alt="甄成集团"
          onerror="this.onerror=null;this.src='images/placeholder.png';">
        <img src="./images/logo_se.png" class="logo_se" alt="甄成集团"
          onerror="this.onerror=null;this.src='images/placeholder.png';">
      </div>
      <div class="menu-toggle">
        <span></span>
        <span></span>
        <span></span>
      </div>
      <ul class="nav-links">
        <li><a href="/" class="nav-link">首页</a></li>
        <li><a href="about.html" class="nav-link">关于甄成</a></li>
        <li><a href="core-business.html" class="nav-link">核心业务</a></li>
        <li><a href="news.html" class="nav-link active">新闻资讯</a></li>
        <li><a href="development.html" class="nav-link">发展历程</a></li>
        <li><a href="contact.html" class="nav-link">联系我们</a></li>
      </ul>
    </div>
  </nav>
</header>
<style>
  /* 导航栏样式 */
  header {
    position: relative;
    width: 100%;
  }

  .navbar {
    width: 100%;
    margin: auto;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    /* left: 50%;
        transform: translateX(-50%); */

    padding: 0 5rem;
    height: 6rem;
    /* background: linear-gradient(180.00deg, rgba(0,0,0,0.5) , rgba(0,0,0,0.0)); */
    z-index: 1000;
    transition: all 0.3s ease;
  }

  .navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 6rem;
    max-width: 100rem;
    margin: auto;
  }

  .navbar.scrolled {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(1.5rem);
    -webkit-backdrop-filter: blur(1.5rem);
    border-bottom: 1px solid #eee;
    z-index: 99999999;
  }

  .logo {
    display: flex;
    align-items: center;
  }


  .nav-links {
    display: flex;
    list-style: none;
    gap: 3.2rem;
    margin: 0;
    padding: 0;
  }

  .nav-link {
    text-decoration: none;
    color: #d4d2d2;
    padding: 0.15rem 0;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
    font-size: 1.1rem;
    font-weight: 400;
  }

  .nav-link.active,
  .nav-link:hover {
    font-weight: 700;
    color: #fff;
  }

  .nav-link.active::after,
  .nav-link:hover::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    bottom: -0.4rem;
    width: 1.375rem;
    height: 0.1875rem;
    background: #0e78ff;
  }

  .navbar.scrolled .nav-link {
    color: #222132;
    font-size: 1.1rem;
    font-weight: normal;
  }

  .logo .logo_white,
  .logo .logo_se {
    width: 9.5rem;
    height: auto;
    transition: width 0.3s ease;
  }

  .logo .logo_se {
    display: none;
  }

  .scrolled .logo .logo_whtie {
    display: none;
  }

  .scrolled .logo .logo_se {
    display: block;
  }


  .navbar.scrolled .nav-link.active,
  .navbar.scrolled .nav-link:hover {
    font-weight: bolder;
    color: #0E78FF;
  }

  /* 移动端菜单按钮 */
  .menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
    cursor: pointer;
    z-index: 1001;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 0.125rem;
    background: #fff;
    transition: all 0.3s ease;
  }

  .menu-toggle.active span {
    background: #333;
  }

  .navbar.scrolled .menu-toggle span {
    background: #333;
  }


  /* 响应式导航栏 */
  @media screen and (max-width: 1440px) {
    .navbar {
      padding: 0 5rem;
    }

    .nav-links {
      gap: 3rem;
    }

    .logo img {
      width: 11rem;
    }
  }

  @media screen and (max-width: 1200px) {
    .navbar {
      padding: 0 3rem;
    }
  }


  @media screen and (max-width: 1024px) {
    .navbar {
      padding: 0 3rem;
    }

    .logo img {
      width: 9rem;
    }

    .nav-links {
      gap: 2.5rem;
    }

    .nav-link {
      font-size: 1.25rem;
    }
  }

  @media screen and (max-width: 768px) {
    .navbar {
      padding: 0 1.5rem;
      height: 5rem;
      /* background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(0.5rem);
            -webkit-backdrop-filter: blur(0.5rem); */
    }

    .navbar.scrolled {
      background: rgba(255, 255, 255, 0.95);
    }

    .navbar-container {
      height: 5rem;
    }

    .logo img {
      width: 6rem;
    }

    .menu-toggle {
      display: flex;
    }

    .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 100%;
      height: 100vh;
      background: rgba(255, 255, 255, 0.9);
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3rem;
      transition: right 0.3s ease;
      backdrop-filter: blur(2rem);
      -webkit-backdrop-filter: blur(2rem);
      padding: 2rem 0;
    }

    .navbar.scrolled .nav-links {
      background: rgba(255, 255, 255, 0.95);
    }

    .nav-links.active {
      right: 0;
    }

    .nav-link {
      color: #131926;
      font-size: 1.6rem;
      padding: 2rem 0;
    }

    .navbar.scrolled .nav-link {
      color: #222132;
    }

    .nav-link.active,
    .nav-link:hover {
      color: #0e78ff;
    }

    .nav-link.active::after,
    .nav-link:hover::after {
      width: 1rem;
      height: 0.125rem;
      bottom: -0.25rem;
      display: none;
    }

    .menu-toggle.active span:nth-child(1) {
      transform: translateY(0.9rem) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
      opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
      transform: translateY(-0.5rem) rotate(-45deg);
    }
  }
</style>